public class Solution1678 {
    public String interpret(String command) {
        return command.replaceAll("\\(al\\)","al").replaceAll("\\(\\)","o");
    }

    public static void main(String[] args) {
        System.out.println(new Solution1678().interpret("G()(al)"));
    }
}
